
layui.define(['table', 'form','layer'], function(exports){
  var $ = layui.$
  ,table = layui.table
  ,form = layui.form
  ,layer = layui.layer;
  table.render({
    elem: '#user-table'
    ,url: 'user/getPageList' 
    ,cols: [[
      {type: 'checkbox', fixed: 'left'}
      ,{field: 'id', width: 150, title: 'ID',hide:true}
      ,{field: 'name', width: 100, title: '用户名'}
      ,{field: 'mobileno', title: '手机号',width:120}
      ,{field: 'gender', title: '性别',width:90}
      ,{field: 'orgName', title: '所属公司',width:130}
      ,{field: 'nodeOrgName', title: '所在部门',width:260}
      ,{field: 'postName', title: '岗位',width:150}
      ,{field: 'initialLetter', title: '简拼',width:110}
      ,{field: 'fullPinyin', title: '全拼',width:120}
    ]]
    ,page: true
    ,limit: 18
    ,height: top.height-145
    ,text: '对不起，加载出现异常！'
    ,done:function(){
    	enableRowClick(table,form,'user-table',"user-table");
    }
  });
  table.render({
	    elem: '#emergency-table'
	    ,url: 'emergencyContact/getPageList' 
	    ,where:{userId:"#"}
	    ,cols: [[
	      {type: 'checkbox', fixed: 'left'}
	      ,{field: 'id', width: 150, title: 'ID',hide:true}
	      ,{field: 'name', width: 150, title: '联系人'}
	      ,{field: 'relationship', title: '双方关系',width:150}
	      ,{field: 'mobileno', title: '手机号',width:150}
	      ,{field: 'createUserName', title: '登记人',width:190}
	      ,{field: 'createTime', title: '登记时间',width:180}
	    ]]
	    ,page: true
	    ,limit: 30
	    ,height: top.height-145
	    ,text: '对不起，加载出现异常！'
	    ,done:function(){
	    	enableRowClick(table,form,'emergency-table',"emergency-table");
	    }
	  });
  table.render({
	  elem: '#attachment-table'
	  ,url: 'attachment/getPageList' 
	  ,where:{fid:"#"}
  	  ,cols: [[
  		  {type: 'checkbox'}
  		  ,{field: 'id', width: 150, title: 'ID',hide:true}
		  ,{field: 'name', title: '附件名称',width:300}
		  ,{field: 'sizeDesc', title: '文件大小',width:150}
		  ,{field: 'createUserName', title: '上传人',width:190}
		  ,{field: 'createTime', title: '上传时间',width:180}
		  ,{field: 'descs', title: '备注说明'}
	  ]]
  ,page: true
  ,limit: 30
  ,height: top.height-145
  ,text: '对不起，加载出现异常！'
	  ,done:function(){
		  enableRowClick(table,form,'attachment-table',"attachment-table");
	  }
  });
  table.render({
	  elem: '#education-table'
	  ,url: 'employeeExperience/getPageList' 
	  ,where:{userId:"#",type:"education"}
  	  ,cols: [[
  		  {type: 'checkbox'}
  		  ,{field: 'id', width: 150, title: 'ID',hide:true}
		  ,{field: 'name', title: '教育机构',width:220}
		  ,{field: 'beginDate', title: '开始日期',width:120}
		  ,{field: 'endDate', title: '结束日期',width:120}
		  ,{field: 'descs', title: '教育简介'}
	  ]]
  ,page: true
  ,limit: 30
  ,height: top.height-145
  ,text: '对不起，加载出现异常！'
	  ,done:function(){
		  enableRowClick(table,form,'education-table',"education-table");
	  }
  });
  table.render({
	  elem: '#train-table'
	  ,url: 'employeeExperience/getPageList' 
	  ,where:{userId:"#",type:"train"}
  	  ,cols: [[
		   {type: 'checkbox'}
		  ,{field: 'id', width: 150, title: 'ID',hide:true}
		  ,{field: 'name', title: '培训机构',width:220}
		  ,{field: 'beginDate', title: '开始日期',width:120}
		  ,{field: 'endDate', title: '结束日期',width:120}
		  ,{field: 'descs', title: '培训简介'}
	  ]]
	  ,page: true
	  ,limit: 30
	  ,height: top.height-145
	  ,text: '对不起，加载出现异常！'
	  ,done:function(){
		  enableRowClick(table,form,'train-table',"train-table");
	  }
  });
  table.render({
	  elem: '#work-table'
		  ,url: 'employeeExperience/getPageList' 
			  ,where:{userId:"#",type:"work"}
  ,cols: [[
	  {type: 'checkbox'}
	  ,{field: 'id', width: 150, title: 'ID',hide:true}
	  ,{field: 'name', title: '工作单位',width:220}
	  ,{field: 'beginDate', title: '开始日期',width:120}
	  ,{field: 'endDate', title: '结束日期',width:120}
	  ,{field: 'descs', title: '工作简介'}
	  ]]
  ,page: true
  ,limit: 30
  ,height: top.height-145
  ,text: '对不起，加载出现异常！'
	  ,done:function(){
		  enableRowClick(table,form,'work-table',"work-table");
	  }
  });
  exports('user', {})
});